from utils.feature import STFT, iSTFT
from models.local.TFgridnet_v2 import TF_gridnet_attentionblock
from model.model import Tar_Model

def build_model(model_conf):
    stft = STFT(**model_conf['stft'])
    istft = iSTFT(**model_conf['istft'])
    real_att = TF_gridnet_attentionblock(**model_conf['real_att'])
    model = Tar_Model(stft, istft, real_att, **model_conf['tar_model_conf'])
    return model